﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CC98
{
    public static class Utility
    {
#if METRO
        public const string SchemaNamespace = "http://schemas.cc98.org/metro";
#endif

        #region Exception helper

        public static Exception NewException<T>(IEnumerable<KeyValuePair<object, object>> datas) where T : Exception, new()
        {
            var exp = new T();

            if (datas != null)
                foreach (var kv in datas)
                    exp.Data[kv.Key] = kv.Value;

            return exp;
        }

        #endregion
    }
}
